package cn.hy.机考.part02;

import java.util.Scanner;

/**
 * @author zhaomu
 * <p>
 * 十、求解连续数列
 * 已知连续正整数数列{K}=K1,K2,K3...Ki 的各个数相加之和为 S，i=N (0<S<100000, 0<N<100000), 求此数列 K
 * 输入包含两个参数:
 * 1)连续正整数数列和 S
 * 2) 数列里数的个数 N
 * 如果有解输出数列 K，如果无解输出-1
 * <p>
 * 525 6
 * 85 86 87 88 89 90
 * 3 5
 * -1
 */
public class Demo10 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int sum = in.nextInt();
        int n = in.nextInt();
        // sum(x x+1 x+2 ... x+n-1) = sum
        // n*x + n*(n-1)/2 = sum
        // x= [sum - n*(n-1)/2 ]/n
        int temp = sum - n * (n - 1) / 2;
        if (temp <= 0 || temp % n != 0) {
            System.out.println(-1);
            return;
        }
        int begin = temp / n;
        for (int i = 0; i < n; i++) {
            System.out.print(begin + i);
            System.out.print(' ');
        }
    }
}
